<?php
namespace app\index\model;
use think\Model;
class AgencyWithRecord extends Model
{
    protected $resultSetType = 'collection';
    function Agency()
    {
        return $this->hasOne('Agency','id','id');
    }
    function Record()
    {
        return $this->hasOne('Record','agencyid','id');
    }
}